Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Developing Applications > Developing XPage Applications > Using Java script libraries in XPages
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Using Java script libraries in XPages

How to reuse Java code from Java script libraries on XPages
Community articleUsing Java script libraries in XPages
Added by ~Mario Rejumisterakoi | Edited by ~Mario Rejumisterakoi on October 14, 2011 | Version 7
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
How to reuse Java code from Java script libraries on XPages
Tags: XPages, Java script library
To make the existing code from Java script libraries available in XPages I use a LotusScript agent doing the following:
- extract compiled .jar files from Java script libraries (they are attached to design notes as "%%object%%.jar" files);
- convert the extracted files to Rich Text format (CD segments);
- import converted files into the folder WebContent/WEB-INF/lib in the database
as file resources using DXL (to create a new design element without a real content) + C API function
 MailAddMessageBodyComposite (to embed CD file as rich-text into the just created design element).
That is why the agent it written on LotusScript: it is easy to call C functions from LS.

You have to run this agent after any modifications of Java script libraries to refresh
.JAR's in the WEB-INF folder.
 
To ensure that .jar files are imported successfully open the Java perspective in Domino Designer
and check the project folder WebContent /WEB-INF/lib. If the application was opened previously
in this perspective press F9 to refresh the application structure. If you ran the agent first time
and the application was opened in Domino Designer then you have to close and then reopen Domino Designer -
otherwise the new subfolder "lib" in "WEB-INF" still invisible in the application structure.
 
Notice that this solution became much less useful since 8.5.3 as there is a new design element:
Code\Java where you can write Java classes directly available in SSJS.


  • Actions Show Menu▼


expanded Attachments (1)
collapsed Attachments (1)
Edit the article to add or modify attachments.
File TypeSizeFile NameCreated OnDelete file
application/pdf 422 KB AgentCode.pdf 10/14/11, 5:24 PM
expanded Versions (7)
collapsed Versions (7)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (7)Oct 14, 2011, 5:25:34 PM~Mario Rejumisterakoi  
6Oct 14, 2011, 5:17:38 PM~Bill Nimachekakoi  
5Oct 14, 2011, 5:05:44 PM~Bill Nimachekakoi  
4Oct 14, 2011, 5:04:49 PM~Bill Nimachekakoi  
3Oct 14, 2011, 5:02:58 PM~Bill Nimachekakoi  
2Oct 14, 2011, 4:58:34 PM~Bill Nimachekakoi  
1Oct 14, 2011, 4:52:05 PM~Bill Nimachekakoi  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility